#ifndef INFERENCE_H
#define INFERENCE_H
#include"Grammar.h"
#include<vector>
#include<iostream>
#include<math.h>
#include"Digamma.h"
#include<assert.h>
#include"GrammarSymbol.h"
#include"Config.h"
class Inference{
  Grammar& grammar;
  int Grammar_Num,Token_Num;
  std::vector< std::vector<double> > b_count,e_count;
  public:
  Inference(Grammar& g);

  void beforeinference();
  void insideoutside(std::vector<int> sentence);
  void updategrammar();
  bool isconverge();

  void printcount();
};
#endif
